﻿using System;
using jSLApp.Client.Workflow;
using jSLCore.Client.Presentation.BaseControl;

namespace jSLApp.Client.Forms
{
    public partial class PlayFile : DialogControl
    {
        private readonly string _fileName;

        public PlayFile(string fileName):this()
        {
            _fileName = fileName;
        }

        public PlayFile()
        {
            InitializeComponent();
        }

        #region dialog

        public override void LoadInitialData()
        {
            player.SetSource(_fileName,true);
            player.Header = _fileName;
        }

        public override bool IsOkVisible
        {
            get { return false; }
        }

        public override bool IsStandartOkCancelEnabled
        {
            get { return true; }
        }

        public override object CancelContent
        {
            get { return "Закрыть"; }
        }

        #endregion
    }
}
